﻿@model IEnumerable<Domain.Question>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            Title
        </th>
        <th>
            Body
        </th>
        <th>
            Votes
        </th>
        <th>
            Views
        </th>
        <th>
            DateCreated
        </th>
        <th>
            UserId
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Title)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Body)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Votes)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Views)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.DateCreated)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.UserId)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.Id }) |
            @Html.ActionLink("Details", "Details", new { id=item.Id }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.Id })
        </td>
    </tr>
}

</table>
